package at.ac.tuwien.swa.sparrow.desktop;

import ac.at.tuwien.infosys.swa.audio.Fingerprint;
import ac.at.tuwien.infosys.swa.audio.FingerprintSystem;

import javax.sound.sampled.AudioSystem;
import java.io.File;

public class AudioFingerprintFunction {
	public Fingerprint apply(File f) {
		try {
			return FingerprintSystem.fingerprint(AudioSystem.getAudioInputStream(f));
		} catch (Exception e) {
			return null;
		}
	}
}
